@extends('backend.template.bootstrap')
@section('content')
<div id="page-wrapper" >
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-header">
					相册管理 <small>Galleries.<i class="fa fa-binoculars"></i></small>
                </h1>
            </div>
        </div>
        <!-- /. ROW  -->
        <div class="row">
            <div class="col-md-12">
                <!-- Advanced Tables -->
                <div class="panel panel-default">
                    <div class="panel-body">
                        <a href="{{ url('backend/galleries/create') }}" class="btn btn-primary"><li class="fa fa-edit"></li> 创建相册</a>
                        <br />
                        <br />
                        @if($galleries->count() > 0)
						<div class="row">
						@foreach($galleries as $gallery)
							<div class="col-sm-2">
								<div class="thumbnail">
									<img src="{{ $gallery->coverUrl('242x200') }}" alt="" style="border: solid 1px; border-color: #ddd;">
									<div class="caption">
										<h3>{{ $gallery->name }}</h3>
										<p style="font-size: 12px;">
		                            		<div style="float: left;">
		                            			<span class="btn btn-default btn-sm disabled">{{ $gallery->category->name }}</span>  &nbsp;&nbsp;
												<a href="{{ url('backend/galleries/'.$gallery->id.'/imgs') }}">
			                            			<span class="fa fa-picture-o" style="width: 20px;"></span>  {{ $gallery->imgs->count() }} 张
			                            		</a>
		                            		</div>
		                            		<div style="float: right;">
												<a href="#" class="fa fa-trash-o"></a>
		                            		</div>
	                            		</p>
									</div>
								</div>
							</div>
						@endforeach
						<div class="row">
						@else
						<br />
						<br />
	                    <div class="col-sm-12 col-xs-12">
							<h4>暂无相册</h4>
						</div>
						<br />
						<br />
						@endif
                    </div>
                </div>
                <!--End Advanced Tables -->
            </div>
        </div>
    </div>
    <!-- /. PAGE INNER  -->

</div>
@endsection